import random

num1 = random.randint(1,6)
num2 = random.randint(1,6)
num3 = random.randint(1,6)
s = num1 + num2 +num3
jindou = 1000
count = 0
count_y = 0
count_n = 0

while jindou > 100:
    str1 = input("请输入：")
    if str1 == "exit":
        break
    elif 3<s<10 and str1 == "小":
        jindou += 100
        count_y += 1
        print("恭喜你猜对了")
    elif 11<s<18 and str1 == "大":
        jindou += 100
        count_y += 1
        print("恭喜你猜对了")
    else:
        jindou -= 100
        count_n += 1
        print("猜错啦，再接再厉吧")
    count = count_y + count_n

print(f"总共玩了{count}轮，胜率是{count_y/count*100}%")